export interface IUserInfo {
  accessToken: string;
  avatar?: any;
  colorSchema: string;
  createDate: string;
  createTime: number;
  email: string;
  id: string;
  isActive: string;
  isAnonymous: string;
  isAuthenticated: string;
  isSuperuser: boolean;
  language: string;
  lastLoginTime: string;
  loginChannel: string;
  nickname: string;
  password: string;
  status: string;
  updateDate: string;
  updateTime: number;
}

export type TaskExecutorElapsed = Record<string, number[]>;

export interface ISystemStatus {
  es: Es;
  minio: Minio;
  mysql: Minio;
  redis: Redis;
  taskExecutor: {
    error?: string;
    status: string;
    elapsed?: TaskExecutorElapsed;
  };
}

interface Redis {
  status: string;
  elapsed: number;
  error: string;
  pending: number;
}

export interface Minio {
  status: string;
  elapsed: number;
  error: string;
}

interface Es {
  status: string;
  elapsed: number;
  error: string;
  numberOfNodes: number;
  activeShards: number;
}
